<template>
  <div id="app">
    <!-- <nav class="navbar">
      <div class="nav-brand">
        <h2>小游戏集合</h2>
      </div>
      <ul class="nav-links">
        <li>
          <router-link to="/" class="nav-link">泡泡舞会</router-link>
        </li>
        <li>
          <router-link to="/vote-game" class="nav-link">投票游戏</router-link>
        </li>
      </ul>
    </nav> -->
    
    <main class="main-content">
      <router-view />
    </main>
  </div>
</template>

<script setup>
// 使用 setup 语法糖
import { onMounted } from 'vue'

onMounted(() => {
  console.log('Vue3 应用已挂载')
})
</script>

<style lang="less" scoped>
#app {
  min-height: 100vh;
  background: @bg-color;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: @primary-color;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  
  .nav-brand {
    h2 {
      color: white;
      margin: 0;
      font-size: 1.5rem;
    }
  }
  
  .nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    
    .nav-link {
      color: white;
      text-decoration: none;
      padding: 0.5rem 1rem;
      border-radius: 4px;
      transition: background-color 0.3s ease;
      
      &:hover {
        background-color: rgba(255, 255, 255, 0.1);
      }
      
      &.router-link-active {
        background-color: rgba(255, 255, 255, 0.2);
        font-weight: bold;
      }
    }
  }
}

.main-content {
  // padding: 2rem;
  // max-width: 1200px;
  margin: 0 auto;
}
</style>
